package qf.sail.controller;

import qf.sail.util.StringUtil;
import qf.sail.vo.ResultVO;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/getCode")
public class GetCodeServlet extends BaseServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String code = StringUtil.generateCode();
        System.out.println(code);
        ResultVO resultVO = new ResultVO();
        resultVO.addData("code",code);
        repSuccess(resp,resultVO);
    }
}
